package com.zpf.service.impl;

import com.zpf.dao.AdminDao;
import com.zpf.dao.impl.AdminDaoImpl;
import com.zpf.pojo.Address;
import com.zpf.pojo.Goods;
import com.zpf.pojo.GoodsType;
import com.zpf.pojo.User;
import com.zpf.service.AdminService;

import java.util.List;

public class AdminServiceImpl implements AdminService {

    AdminDao adminDao = new AdminDaoImpl();


    @Override
    public User adminlogin(String username, String password) {
        User user  = adminDao.adminselectByUsernameAndPassword(username,password);

        return user;
    }

    @Override
    public List<User> findAdminByRole() {
        List<User> users = adminDao.findAdminByRole();
        return users;
    }

    @Override
    public List<GoodsType> AdminByShow() {

        return adminDao.AdminByShow();
    }

    @Override
    public List<Goods> getAdminGoodsList() {
        return adminDao.getAdminGoodsList();
    }

    @Override
    public List<GoodsType> AdminAdd() {
        return adminDao.AdminAdd();
    }

    @Override
    public void insert(Address address) {
        adminDao.insert(address);
    }


}

